package com.hdoit.kylin.web.groupActivity.modelconfig;

import com.hdoit.kylin.web.groupActivity.provider.GroupStudentProvider;
import com.tennetcn.component.attribute.DateTimeAttribute;
import com.tennetcn.common.enums.regular.MathRegularExpressions;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.RegularExpressionAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      guoshuren
 * @email       
 * @createtime  2018年03月07日 16:20:31
 * @comment
 */
public class GroupDutyConfig extends ModelMetadataAttributeConfiguration{
    public GroupDutyConfig(){
        this.setProperty("groupId")
            .hasAttribute(new DisplayNameAttribute("课题组"));

        this.setProperty("termId")
            .hasAttribute(new DisplayNameAttribute("学期"))
            .hasAttribute(new RequiredAttribute("学期为必填项"));

        this.setProperty("weekDate")
            .hasAttribute(new DisplayNameAttribute("日期"))
            .hasAttribute(new DateTimeAttribute());

        this.setProperty("employeeId")
            .hasAttribute(new DisplayNameAttribute("值日人"))
            .hasAttribute(new RequiredAttribute("值日人为必填项"))
            .hasAttribute(new DropDownListAttribute(new GroupStudentProvider()));

    }
}